home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / DocShell / ShlEvtHd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.7 KB  |  139 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ShlEvtHd.h
  3.  
  4.     Contains:    Shell event handlers (and others, for now)
  5.  
  6.     Owned by:    Eric House
  7.  
  8.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>     8/22/95    eeh        1230007: refbal-inspired cleanup
  13.          <4>     2/20/95    TÇ        #1210979 BB: 5-$ Bugs need to be evaluated
  14.                                     and removed from Shell
  15.          <3>     1/25/95    eeh        1211798: remove FIRSTBYTESFROMHANDLE and
  16.                                     SETFIRSTBYTESOFHANDLE
  17.          <2>     1/16/95    eeh        1211798: add FIRSTBYTESFROMHANDLE and
  18.                                     SETFIRSTBYTESOFHANDLE
  19.          <1>     6/30/94    TÇ        first checked in
  20.          <0>     6/29/94    SV        SOMverted
  21.          <4>     3/24/94    eeh        bug# 1151750: scripting support for
  22.                                     operations on draft
  23.          <3>      2/8/94    JA        Minor tweaks for CodeWarrior.
  24.          <2>     1/11/94    eeh        nuked FrameEventHandler class
  25.          <1>    11/19/93    eeh        first checked in
  26.  
  27.     To Do:
  28. */
  29.  
  30. #ifndef _SHLEVTHD_
  31. #define _SHLEVTHD_
  32.  
  33. #ifndef _PLFMDEF_
  34. #include "PlfmDef.h"
  35. #endif
  36.  
  37. #ifndef SOM_ODObject_xh
  38. #include <ODObject.xh>
  39. #endif
  40.  
  41. #ifndef SOM_ODFrame_xh
  42. #include <Frame.xh>
  43. #endif
  44.  
  45. //==============================================================================
  46. // Theory of Operation
  47. //==============================================================================
  48.  
  49. /*
  50.     These classes handle events.  They represent the DO on which the event
  51.     will act later.
  52. */
  53.  
  54. //==============================================================================
  55. // Constants
  56. //==============================================================================
  57.  
  58. //==============================================================================
  59. // Scalar Types
  60. //==============================================================================
  61.  
  62. //==============================================================================
  63. // Classes defined in this interface
  64. //==============================================================================
  65.  
  66. class ShellEventHandler;
  67. // class ShellSaveEventHandler;
  68.  
  69. //==============================================================================
  70. // Classes used by this interface
  71. //==============================================================================
  72.  
  73. // class PropAccessor;
  74. // class RealShell;
  75. // class ODWindow;
  76.  
  77. //==============================================================================
  78. // ShellWinPropAccessor
  79. //==============================================================================
  80.  
  81. class HandlerObject
  82. {
  83.     public:
  84.         HandlerObject( DescType theClass, ODObject* theObject,
  85.                 ODSLong refCon ) ;
  86.         DescType GetClass() ;
  87.         ODObject* GetObject() ;
  88.         
  89.         /*virtual*/ void Save( AEDesc* whereFileSpec ) ;
  90.         /*virtual*/ void Close( AEDesc* whereFileSpec, DescType saveOptions ) ;
  91. #ifdef TO_BE_DELETED
  92.         /*virtual*/ void CountElements( DescType elemClass, AEDesc* result ) ;
  93.         /*virtual*/ void Delete() ;
  94.         /*virtual*/ void Clone( AEDesc* whereto, AEDesc* result ) ;
  95. #endif /* TO_BE_DELETED */
  96.         
  97.     protected:
  98.         DescType fObjectClass ;
  99.         ODObject* fTheObject ;
  100.         ODSLong fRefcon ;
  101.  
  102. } ;
  103.  
  104. class ShellEventHandler : public HandlerObject
  105. {
  106.     public:
  107.         ShellEventHandler( DescType theClass, ODObject* theObject,
  108.                 ODSLong refCon ) ;
  109.  
  110.         void Save( AEDesc* whereFileSpec ) ;
  111.         void Close( AEDesc* whereFileSpec, DescType saveOptions ) ;
  112. #ifdef TO_BE_DELETED
  113.         void CountElements( DescType elemClass, AEDesc* result ) ;
  114.         void Delete() ;
  115.         void Clone( AEDesc* whereto, AEDesc* result ) ;
  116. #endif /* TO_BE_DELETED */
  117. };
  118.  
  119. #ifdef TO_BE_DELETED
  120. class PartEventHandler : public HandlerObject
  121. {
  122.     public:
  123.         PartEventHandler( DescType theClass, ODFrame* frame,
  124.                 ODSLong refCon ) ;
  125.  
  126. };
  127. #endif /* TO_BE_DELETED */
  128.  
  129. #ifdef TO_BE_DELETED
  130. class FrameEventHandler : public HandlerObject
  131. {
  132.     public:
  133.         FrameEventHandler( DescType theClass, ODFrame* thePart,
  134.                 ODSLong refCon ) ;
  135.  
  136. };
  137. #endif // TO_BE_DELETED
  138.  
  139. #endif